import request from '@/config/axios'

export interface CourseWiringVO {
  id: number
  workTaskNumber: string
  productNumber: string
  reportQuantity: number
  completeQuantity: number
  differenceQuantity: number
  operator: string
  operatorJobNumber: string
  dictStatus: boolean
  creatorName: string
  updaterName: string
  productName: string
  modelSpecification: string
  orderQuantity: number
  code: string
  partNumber: string
  partName: string
  drawingNumber: string
  partSpecification: string
  material: string
  specification: string
  planStartDate: localdate
  planEndDate: localdate
  netSizeLength: number
  netSizeWidth: number
  cuttingSizeLength: number
  cuttingSizeWidth: number
  planQuantity: number
  productionTeam: string
  deviceName: string
  deviceCode: string
  processPrice: number
}

// 查询生产管理-过程管理-布线管理列表
export const getCourseWiringPage = async (params) => {
  return await request.get({ url: `/produce/course-wiring/page`, params })
}

// 查询生产管理-过程管理-布线管理详情
export const getCourseWiring = async (id: number) => {
  return await request.get({ url: `/produce/course-wiring/getDetail?id=` + id })
}

// 新增生产管理-过程管理-布线管理
export const createCourseWiring = async (data: CourseWiringVO) => {
  return await request.post({ url: `/produce/course-wiring/create`, data })
}

// 修改生产管理-过程管理-布线管理
export const updateCourseWiring = async (data: CourseWiringVO) => {
  return await request.put({ url: `/produce/course-wiring/update`, data })
}

// 删除生产管理-过程管理-布线管理
export const deleteCourseWiring = async (id: number) => {
  return await request.delete({ url: `/produce/course-wiring/delete?id=` + id })
}

// 导出生产管理-过程管理-布线管理 Excel
export const exportCourseWiring = async (data) => {
  return await request.download({ url: `/produce/course-wiring/export-excel`, data })
}

// 指派生产管理-过程管理-布线管理
export const assignCourseWiring = async (data: CourseWiringVO) => {
  return await request.put({ url: `/produce/course-wiring/assign`, data })
}
